package com.carskeeper.controller.body;

import com.alibaba.dubbo.config.annotation.Reference;
import com.carskeeper.body.service.BodyCarDetailsService;
import com.carskeeper.common.dtos.PageResponseResult;
import com.carskeeper.model.body.dtos.QueryDetailDto;
import com.carskeeper.model.body.vo.BodyCarDetailsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "车主车辆详细")
@RestController
@RequestMapping("/body/details")
public class BodyCarDetailsController {

    @Reference(check = false)
    private BodyCarDetailsService bodyCarDetailsService;

    /**
     * 分页查询车主车辆
     * @param dto
     * @return
     */
    @ApiOperation("查询车主车辆")
    @PostMapping("findByPage")
    public PageResponseResult<List<BodyCarDetailsVo>> findByPage(@RequestBody QueryDetailDto dto){
        return bodyCarDetailsService.findByPage(dto);
    }


}
